//获取应用实例
const app = getApp()
Page({
  onLoad: function (options) {
    var that = this;
    that.data.res = options.phone;
    wx.request({
      url: 'https://wxapp.shuhai.cc/hh/goTopics.action',
      method: 'post',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: {
        phone: that.data.res,
      },
      success: function (res) {
        if (res.data.status == "success_one") {
          var result = res.data.data.result;

          console.log(result)
          that.setData({
            loginUrl: result,
          })   
        }
      }, fail: function (res) {
        wx.hideLoading();
        wx.showToast({
          title: '网络错误！',
          icon: 'none',
          duration: 2000
        })
        return;
      }
    });
  }
})
